home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / gcc / gcc258s.zoo / Makefile.cross < prev    next >
Encoding:
Makefile  |  1994-01-30  |  22.7 KB  |  616 lines

  1. # Makefile for GNU C CROSS compiler for the atariST/TT series hosted
  2. #  on a Sun-Sparc host (tested only under SunOS 4.0.3)
  3. #
  4.  
  5. # Makefile for GNU C compiler.
  6. #   Copyright (C) 1987 Free Software Foundation, Inc.
  7.  
  8. #This file is part of GNU CC.
  9.  
  10. #GNU CC is distributed in the hope that it will be useful,
  11. #but WITHOUT ANY WARRANTY.  No author or distributor
  12. #accepts responsibility to anyone for the consequences of using it
  13. #or for whether it serves any particular purpose or works at all,
  14. #unless he says so in writing.  Refer to the GNU CC General Public
  15. #License for full details.
  16.  
  17. #Everyone is granted permission to copy, modify and redistribute
  18. #GNU CC, but only under the conditions described in the
  19. #GNU CC General Public License.   A copy of this license is
  20. #supposed to have been given to you along with GNU CC so you
  21. #can know your rights and responsibilities.  It should be in a
  22. #file named COPYING.  Among other things, the copyright notice
  23. #and this notice must be preserved on all copies.
  24.  
  25. .NOEXPORT: # This tells GNU Make version 3
  26.        # not to put all the variables in the environment.
  27.  
  28. CROSSDIR = /share/gcc-cross/atari
  29. CROSSBIN = $(CROSSDIR)/bin
  30. CROSSLIB = $(CROSSDIR)/lib
  31. CROSSINC = $(CROSSDIR)/include
  32. GCC_INCLUDE_DIR = $(CROSSINC)
  33. GPLUSPLUS_INCLUDE_DIR = $(CROSSDIR)/g++-inc
  34.  
  35. DFLAGS= -DCROSSDIR=\"$(CROSSDIR)\"
  36. CFLAGS =  $(DFLAGS) -O -g  -DCROSSATARI=1 -I./config -I. # -O
  37. # LDFLAGS = 
  38. # host's cc (give full path to gcc is hosts gcc is not before . in your PATH)
  39. CC = /usr/o0/sparc-sun-sunos4.1/bin/gcc
  40.  
  41. # OLDCC should not be the GNU C compiler.
  42. BISON = bison
  43. BISONFLAGS =
  44. AR = ar
  45. SHELL = /bin/sh
  46.  
  47. bindir = $(CROSSBIN)
  48. libdir = $(CROSSLIB)
  49.  
  50. # These are what you would need on HPUX:
  51. # CFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  52. # -g is desirable in CFLAGS, but a compiler bug in HPUX version 5
  53. # bites whenever tree.def, rtl.def or machmode.def is included
  54. # (ie., on every source file).
  55. # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  56. # For CCLIBFLAGS you might want to specify the switch that
  57. # forces only 68000 instructions to be used.
  58.  
  59. # If you are making gcc for the first time, and if you are compiling it with
  60. # a non-gcc compiler, and if your system doesn't have a working alloca() in any
  61. # of the standard libraries (as is true for HP/UX or Genix),
  62. # then get alloca.c from GNU Emacs and un-comment the following line:
  63. # ALLOCA = alloca.o
  64.  
  65. # If your system has alloca() in /lib/libPW.a, un-comment the following line:
  66. # CLIB= -lPW
  67.   
  68. # If your system's malloc() routine fails for any reason (as it does on
  69. # certain versions of Genix), try getting the files
  70. # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
  71. # MALLOC = malloc.o
  72.  
  73. # If you are running GCC on an Apollo, you will need this:
  74. # CFLAGS = -g -O -M 3000 -U__STDC__ -DSHORT_ENUM_BUG
  75.  
  76. # Change this to a null string if obstacks are installed in the
  77. # system library.
  78. OBSTACK=obstack.o
  79.  
  80. # Dependency on obstack, alloca, malloc or whatever library facilities
  81. # are not installed in the system libraries.
  82. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
  83.  
  84. # How to link with both our special library facilities
  85. # and the system's installed libraries.
  86. LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(MALLOC1) $(CLIB)
  87.  
  88. DIR = ../gcc
  89.  
  90. # Object files of CC1.
  91. # Language-specific object files for C.
  92. C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
  93.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  94.  
  95. # Language-specific object files for C++.
  96. CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
  97.    cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \
  98.    cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \
  99.    cp-class.o cp-init.o cp-method.o cp-except.o \
  100.    cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \
  101.    $(CPLUS_INPUT) cp-spew.o c-common.o cp-error.o cp-errfn.o
  102.  
  103. # Files specific to the C interpreter bytecode compiler(s).
  104. BC_OBJS = bc-emit.o bc-optab.o
  105.  
  106. # Language-independent object files.
  107. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  108.  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
  109.  rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
  110.  dbxout.o sdbout.o dwarfout.o xcoffout.o \
  111.  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  112.  regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
  113.  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
  114.  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  115.  insn-attrtab.o aux-output.o getpwd.o convert.o $(EXTRA_OBJS)
  116.  
  117. GCC_PASSES=gcc cc1 cpp
  118.  
  119. # Files to be copied away after each stage in building.
  120. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  121.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  122.  insn-attr.h insn-attrtab.c insn-opinit.c \
  123.  stamp-flags stamp-config stamp-codes \
  124.  stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
  125.  stamp-attr stamp-attrtab stamp-opinit stamp-proto \
  126.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  127.  genattrtab genattr genopinit \
  128.  bc-arity.h bc-opcode.h bc-opname.h \
  129.  stamp-bcarity stamp-bcopcode stamp-bcopname \
  130.  bi-arity bi-opcode bi-opname \
  131.  $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp g++ g++-cross \
  132.  cc1plus cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2)
  133.  
  134. # Header files that are made available to programs compiled with gcc.
  135. USER_H = stddef.h stdarg.h assert.h va-*.h limits.h
  136.  
  137. # If you want to recompile everything, just do rm *.o.
  138. # CONFIG_H = config.h tm.h
  139. CONFIG_H =
  140. RTL_H = rtl.h rtl.def machmode.h machmode.def
  141. TREE_H = tree.h real.h tree.def machmode.h machmode.def
  142. CPLUS_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
  143. BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
  144.  
  145. ALL =  gcc cc1 cpp cc1plus
  146.  
  147. all: $(ALL)
  148.  
  149. compilations: ${OBJS}
  150.  
  151. gcc: gcc.o version.o $(LIBDEPS)
  152.     $(CC) $(CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS)
  153. # Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
  154.     mv gccnew gcc
  155.  
  156. gcc.o: gcc.c $(CONFIG_H)
  157.     $(CC) $(CFLAGS) -c -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" \
  158. -DDEFAULT_TARGET_MACHINE=\"atariST\" gcc.c
  159.  
  160. cc1: $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  161.     $(CC) $(CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  162.  
  163. cc1plus: $(CPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  164.     $(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  165.  
  166. cc1o: $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  167.     $(CC) $(CFLAGS) $(LDFLAGS) -o cc1o $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  168.  
  169. # C-language specific files.
  170.  
  171. c-parse.o : c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h input.h flags.h
  172.     $(CC) $(CFLAGS) -c c-parse.c
  173. c-parse.c c-parse.h: c-parse.y
  174.     $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
  175.  
  176. c-parse.y: c-parse.in 
  177.     sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
  178.       -e "/^ifc$$/d" -e "/^end ifc$$/d" \
  179.       ./c-parse.in > ./c-parse.y
  180.  
  181. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  182. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  183. c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
  184. c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \
  185.     input.h flags.h
  186. c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  187. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
  188. c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
  189.  
  190. # C++ language specific files.
  191.  
  192. cp-parse.o : cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cp-lex.h
  193.     $(CC) -c $(CFLAGS) cp-parse.c
  194.  
  195. cp-parse.c cp-parse.h : cp-parse.y
  196.     @echo expect 29 shift/reduce conflicts and 14 reduce/reduce conflicts
  197.     $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
  198.     grep '^#define[     ]*YYEMPTY' cp-parse.c >>cp-parse.h
  199.  
  200. cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
  201.    cp-parse.h flags.h
  202. cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
  203.    cp-parse.h cp-input.c flags.h
  204. cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  205.   cp-lex.h cp-decl.h stack.h
  206. cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  207.   cp-lex.h cp-decl.h
  208. cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  209. cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  210. cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h \
  211.     cp-class.h flags.h
  212. cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h cp-class.h \
  213.     flags.h
  214. cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  215. cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H)
  216. cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
  217. cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  218. cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  219. cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
  220. cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  221. cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  222. cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
  223.   expr.h insn-codes.h
  224. cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  225. cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H)
  226. cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h
  227. cp-error.o : cp-error.c $(CONFIG_H) $(CPLUS_TREE_H)
  228. cp-errfn.o : cp-errfn.c $(CONFIG_H) $(CPLUS_TREE_H)
  229.  
  230. # Objectionable C language specific files.
  231.  
  232. objc-parse.o : objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  233.    c-tree.h input.h flags.h objc-actions.h
  234.     $(CC) $(CFLAGS) -c objc-parse.c
  235. objc-parse.c : objc-parse.y
  236.     $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
  237.  
  238. objc-actions.o : objc-actions.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h \
  239.    flags.h objc-actions.h
  240.  
  241. # A file used by all variants of C.
  242.  
  243. c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  244.  
  245.  
  246. # Language-independent files.
  247. dumpvers: dumpvers.c
  248.  
  249. version.o: version.c
  250. obstack.o: obstack.c
  251.  
  252. tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
  253. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  254. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
  255. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
  256. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
  257.  insn-attr.h xcoffout.h
  258.  
  259. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  260.  
  261. print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
  262. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  263.  
  264. toplev.o: bytecode.h bc-emit.h
  265. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h \
  266.    defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h bytecode.h
  267. function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  268.    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
  269.    recog.h output.h bytecode.h
  270. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  271.    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
  272.    recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
  273.    bc-emit.h
  274. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h function.h  \
  275.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
  276.    typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
  277.    bc-emit.h modemap.def
  278. calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
  279.    insn-flags.h
  280. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  281.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
  282. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
  283.    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
  284. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  285.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h
  286. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
  287.    insn-config.h reload.h gstab.h xcoffout.h
  288. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
  289.    insn-config.h reload.h
  290. dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
  291.    insn-config.h reload.h output.h
  292. xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
  293. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) flags.h gvarargs.h function.h  \
  294.    regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h bc-opcode.h \
  295.    bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
  296. real.o : real.c $(CONFIG_H) $(TREE_H)
  297. getpwd.o : getpwd.c $(CONFIG_H)
  298.  
  299. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
  300.    insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
  301.    bytecode.h
  302.  
  303. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
  304.    insn-config.h insn-flags.h insn-codes.h expr.h real.h
  305. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  306.  
  307. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
  308.    insn-config.h recog.h
  309. loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
  310.    insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
  311. unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  312.    integrate.h regs.h flags.h expr.h loop.h
  313. flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
  314.    basic-block.h regs.h hard-reg-set.h output.h
  315. combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h  \
  316.    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
  317.    basic-block.h recog.h real.h
  318. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  319.    basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
  320. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
  321.    regs.h hard-reg-set.h insn-config.h recog.h output.h
  322. global.o : global.c $(CONFIG_H) $(RTL_H) flags.h  \
  323.    basic-block.h regs.h hard-reg-set.h insn-config.h output.h
  324.  
  325. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
  326.    reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
  327. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
  328.    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
  329.    basic-block.h recog.h output.h
  330. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  331.    regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
  332. reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
  333.    basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
  334.    flags.h output.h
  335. sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
  336.    flags.h insn-config.h insn-attr.h
  337. final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h regs.h \
  338.    recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
  339.    hard-reg-set.h insn-codes.h gstab.h xcoffout.h
  340. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  341.    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
  342.    insn-flags.h insn-codes.h real.h
  343. reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
  344.    regs.h hard-reg-set.h flags.h insn-config.h
  345.    
  346. aux-output.o : aux-output.c $(CONFIG_H) \
  347.    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
  348.    insn-flags.h output.h insn-attr.h insn-codes.h
  349.  
  350. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  351.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  352.   insn-attr.h insn-attrtab.c
  353.  
  354. insn-config.h : md genconfig
  355.     ./genconfig md > tmp-insn-config.h
  356.     ./move-if-change tmp-insn-config.h insn-config.h
  357.  
  358. insn-flags.h : md genflags
  359.     ./genflags md > tmp-insn-flags.h
  360.     ./move-if-change tmp-insn-flags.h insn-flags.h
  361.  
  362. insn-codes.h : md gencodes
  363.     ./gencodes md > tmp-insn-codes.h
  364.     ./move-if-change tmp-insn-codes.h insn-codes.h
  365.  
  366. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h
  367.     $(CC) $(CFLAGS) -c insn-emit.c
  368.  
  369. insn-emit.c : md genemit
  370.     ./genemit md > tmp-insn-emit.c
  371.     ./move-if-change tmp-insn-emit.c insn-emit.c
  372.  
  373. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h
  374.     $(CC) $(CFLAGS) -c insn-recog.c
  375.  
  376. insn-recog.c : md genrecog
  377.     ./genrecog md > tmp-insn-recog.c
  378.     ./move-if-change tmp-insn-recog.c insn-recog.c
  379.  
  380. insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
  381.   insn-config.h flags.h rtl.h recog.h expr.h reload.h
  382.     $(CC) $(CFLAGS) -c insn-opinit.c
  383.  
  384. insn-opinit.c: md genopinit
  385.     ./genopinit md > tmp-opinit.c
  386.     ./move-if-change tmp-opinit.c insn-opinit.c
  387.  
  388. insn-extract.o : insn-extract.c $(RTL_H)
  389.     $(CC) $(CFLAGS) -c insn-extract.c
  390.  
  391. insn-extract.c : md genextract
  392.     ./genextract md > tmp-insn-extract.c
  393.     ./move-if-change tmp-insn-extract.c insn-extract.c
  394.  
  395. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h
  396.     $(CC) $(CFLAGS) -c insn-peep.c
  397.  
  398. insn-peep.c : md genpeep
  399.     ./genpeep md > tmp-insn-peep.c
  400.     ./move-if-change tmp-insn-peep.c insn-peep.c
  401.  
  402. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h insn-flags.h conditions.h output.h aux-output.c
  403.     $(CC) $(CFLAGS) -c insn-output.c
  404.  
  405. insn-output.c : md genoutput
  406.     ./genoutput md > tmp-insn-output.c
  407.     ./move-if-change tmp-insn-output.c insn-output.c
  408.  
  409. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
  410.      insn-attr.h insn-config.h
  411.     $(CC) $(CFLAGS) -c insn-attrtab.c
  412.  
  413. insn-attr.h: md genattr
  414.     ./genattr md > tmp-attr.h
  415.     ./move-if-change tmp-attr.h insn-attr.h
  416.  
  417. insn-attrtab.c: md genattrtab
  418.     ./genattrtab md > tmp-attrtab.c
  419.     ./move-if-change tmp-attrtab.c insn-attrtab.c
  420.  
  421. # Now the programs that generate those files.
  422.  
  423. genconfig : genconfig.o rtl.o $(LIBDEPS)
  424.     $(CC) $(CFLAGS) $(LDFLAGS) -o genconfig genconfig.o rtl.o $(LIBS)
  425.  
  426. genconfig.o : genconfig.c $(RTL_H)
  427.     $(CC) $(CFLAGS) -c genconfig.c
  428.  
  429. genflags : genflags.o rtl.o $(LIBDEPS)
  430.     $(CC) $(CFLAGS) $(LDFLAGS) -o genflags genflags.o rtl.o $(LIBS)
  431.  
  432. genflags.o : genflags.c $(RTL_H)
  433.     $(CC) $(CFLAGS) -c genflags.c
  434.  
  435. gencodes : gencodes.o rtl.o $(LIBDEPS)
  436.     $(CC) $(CFLAGS) $(LDFLAGS) -o gencodes gencodes.o rtl.o $(LIBS)
  437.  
  438. gencodes.o : gencodes.c $(RTL_H)
  439.     $(CC) $(CFLAGS) -c gencodes.c
  440.  
  441. genemit : genemit.o rtl.o $(LIBDEPS)
  442.     $(CC) $(CFLAGS) $(LDFLAGS) -o genemit genemit.o rtl.o $(LIBS)
  443.  
  444. genemit.o : genemit.c $(RTL_H)
  445.     $(CC) $(CFLAGS) -c genemit.c
  446.  
  447. genopinit : genopinit.o rtl.o $(LIBDEPS)
  448.     $(CC) $(CFLAGS) $(LDFLAGS) -o genopinit genopinit.o rtl.o $(LIBS)
  449.  
  450. genopinit.o : genopinit.c $(RTL_H)
  451.     $(CC) $(CFLAGS) -c genopinit.c
  452.  
  453. genrecog : genrecog.o rtl.o $(LIBDEPS)
  454.     $(CC) $(CFLAGS) $(LDFLAGS) -o genrecog genrecog.o rtl.o $(LIBS)
  455.  
  456. genrecog.o : genrecog.c $(RTL_H)
  457.     $(CC) $(CFLAGS) -c genrecog.c
  458.  
  459. genextract : genextract.o rtl.o $(LIBDEPS)
  460.     $(CC) $(CFLAGS) $(LDFLAGS) -o genextract genextract.o rtl.o $(LIBS)
  461.  
  462. genextract.o : genextract.c $(RTL_H)
  463.     $(CC) $(CFLAGS) -c genextract.c
  464.  
  465. genpeep : genpeep.o rtl.o $(LIBDEPS)
  466.     $(CC) $(CFLAGS) $(LDFLAGS) -o genpeep genpeep.o rtl.o $(LIBS)
  467.  
  468. genpeep.o : genpeep.c $(RTL_H)
  469.     $(CC) $(CFLAGS) -c genpeep.c
  470.  
  471. genoutput : genoutput.o rtl.o $(LIBDEPS)
  472.     $(CC) $(CFLAGS) $(LDFLAGS) -o genoutput genoutput.o rtl.o $(LIBS)
  473.  
  474. genoutput.o : genoutput.c $(RTL_H)
  475.     $(CC) $(CFLAGS) -c genoutput.c
  476.  
  477. genattr : genattr.o rtl.o $(LIBDEPS)
  478.     $(CC) $(CFLAGS) $(LDFLAGS) -o genattr \
  479.      genattr.o rtl.o $(LIBS)
  480.  
  481. genattr.o : genattr.c $(RTL_H) config.h
  482.     $(CC) -c $(CFLAGS) genattr.c
  483.  
  484. genattrtab : genattrtab.o rtl.o rtlanal.o $(LIBDEPS)
  485.     $(CC) $(CFLAGS) $(LDFLAGS) -o genattrtab \
  486.      genattrtab.o rtl.o rtlanal.o $(LIBS)
  487.  
  488. genattrtab.o : genattrtab.c $(RTL_H) config.h insn-config.h
  489.     $(CC) -c $(CFLAGS) genattrtab.c
  490.  
  491. # Remake bytecode files.
  492. # BI_ALL=bi-run.o
  493. BI_ALL=
  494. BC_ALL=bc-opname.h bc-opcode.h bc-arity.h
  495. BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
  496.  
  497.  
  498. bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
  499.      bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
  500. bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
  501.         bc-opcode.h bc-typecd.h bc-typecd.def
  502.  
  503. bi-run.o:    $(srcdir)/bi-run.c $(srcdir)/bi-run.h $(srcdir)/bc-typecd.h \
  504.   bc-opname.h bc-arity.h bc-opcode.h
  505.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/bi-run.c
  506.  
  507. HOST_CC = $(CC)
  508. HOST_CFLAGS = $(CFLAGS)
  509. HOST_LDFLAGS = $(LDFLAGS)
  510. HOST_LIBDEPS = $(LIBDEPS)
  511. HOST_LIBS = $(LIBS)
  512. srcdir = .
  513.  
  514. bytecode: $(BI_ALL) $(BC_ALL)
  515.  
  516. bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
  517.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-arity \
  518.      bi-arity.o $(BI_OBJ) $(HOST_LIBS)
  519. bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
  520.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opcode \
  521.      bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
  522. bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
  523.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opname \
  524.      bi-opname.o $(BI_OBJ) $(HOST_LIBS)
  525.  
  526. $(srcdir)/bi-parser.c $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.y
  527.     cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
  528. bi-parser.o:    $(srcdir)/bi-parser.c $(srcdir)/bi-defs.h hconfig.h
  529.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  530.        $(srcdir)/bi-parser.c
  531. bi-lexer.o:    $(srcdir)/bi-lexer.c $(srcdir)/bi-parser.h hconfig.h
  532.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  533.        $(srcdir)/bi-lexer.c
  534. bi-arity.o: bi-arity.c $(srcdir)/bi-defs.h hconfig.h
  535.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  536.        $(srcdir)/bi-arity.c
  537. bi-opcode.o: bi-opcode.c $(srcdir)/bi-defs.h hconfig.h
  538.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  539.        $(srcdir)/bi-opcode.c
  540. bi-opname.o: bi-opname.c $(srcdir)/bi-defs.h hconfig.h
  541.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  542.        $(srcdir)/bi-opname.c
  543. bi-reverse.o: bi-reverse.c $(srcdir)/bi-defs.h
  544.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  545.        $(srcdir)/bi-reverse.c
  546.  
  547.  
  548. bc-arity.h: stamp-bcarity ; @true
  549. stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
  550.     ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
  551.     $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
  552.     touch stamp-bcarity
  553.  
  554. bc-opcode.h: stamp-bcopcode ; @true
  555. stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
  556.     ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
  557.     $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
  558.     touch stamp-bcopcode
  559.  
  560. bc-opname.h: stamp-bcopname ; @true
  561. stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
  562.     ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
  563.     $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
  564.     touch stamp-bcopname
  565.  
  566. bytecode.mostlyclean:
  567.     -rm -f bc-arity.h bc-opcode.h bc-opname.h
  568.  
  569. bytecode.distclean bytecode.clean:    bytecode.mostlyclean
  570.     -rm -f bi-arity bi-opcode bi-opname bi-lexer
  571.  
  572. bytecode.realclean: bytecode.clean
  573.     -rm -f bi-parser.c bi-parser.h
  574.  
  575.  
  576.  
  577. # Making the preprocessor
  578. cpp: cccp
  579.     -rm -f cpp
  580.     ln cccp cpp
  581. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  582.     $(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  583. cexp.o: cexp.c
  584. cexp.c: cexp.y
  585.     $(BISON) -o cexp.c cexp.y
  586. cccp.o: cccp.c pcp.h $(CONFIG_H)
  587.     $(CC) $(CFLAGS) -DGCC_INCLUDE_DIR=\"$(GCC_INCLUDE_DIR)\" \
  588.           -DGPLUSPLUS_INCLUDE_DIR=\"$(GPLUSPLUS_INCLUDE_DIR)\" \
  589.       -DCROSSINC=\"$(CROSSINC)\" -c cccp.c
  590.  
  591. # gnulib is not deleted because deleting it would be inconvenient
  592. # for most uses of this target.
  593. clean: bytecode.clean
  594.     -rm -f *.o *.oo $(STAGESTUFF)
  595.     -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  596.     -rm -f core
  597.  
  598. # Get rid of every file that's generated from some other file (except INSTALL).
  599. realclean: clean bytecode.realclean
  600.     -rm -f $(ALL)
  601.     -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
  602.     -rm -f errs gnulib TAGS 
  603.     -rm -f core report
  604.     -rm -f internals internals-* internals.?? internals.??s
  605.  
  606. # Copy the files into directories where they will be run.
  607. install: all
  608.     cp cc1 $(libdir)/gcc-cc1
  609.     cp cpp $(libdir)/gcc-cpp
  610.     cp gcc $(bindir)/cgcc
  611.     cp cc1plus $(libdir)/gcc-cc1plus
  612.  
  613. force:
  614. #In GNU Make, ignore whether `stage*' exists.
  615. .PHONY: clean realclean
  616.